Component({
  data: {
    selected: 0,
    color: "#12B7F6",
    selectedColor: "#12B7F6",
    list: [
      {
        pagePath: "/pages/index/index",
        iconPath: "/assets/image/icon_home@2x.png",
        selectedIconPath: "/assets/image/icon_home_selected@2x.png",
        text: "首页"
      }, 
      {
        pagePath: "/pages/station/station",
        iconPath: "/assets/image/icon_station@2x.png",
        selectedIconPath: "/assets/image/icon_station_selected@2x.png",
        text: "站点"
      },
      {
        pagePath: "/pages/release/index",
        iconPath: "/assets/image/icon_release_selected@2x.png",
        selectedIconPath: "/assets/image/icon_release_selected@2x.png",
        text: "发布"
      },
      {
        pagePath: "/pages/message/index",
        iconPath: "/assets/image/icon_message@2x.png",
        selectedIconPath: "/assets/image/icon_message_selected@2x.png",
        text: "消息"
      },
      {
        pagePath: "/pages/mine/index",
        iconPath: "/assets/image/icon_mine@2x.png",
        selectedIconPath: "/assets/image/icon_mine_selected@2x.png",
        text: "个人中心"
      }
    ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      console.log(url);
      wx.redirectTo({url})
      this.setData({
        selected: data.index
      })
    }
  }
})